<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.mytrip.model.News" import="java.util.*" import="java.text.SimpleDateFormat" import="com.mytrip.util.SpringUtil" import="com.mytrip.service.NewsManager" %>
    <div id="flight_right">
      <div class="GTbox">
        <div class="GTtitle">
          <h3>网站动态</h3>
          <div class="TR"><a href="<%=request.getContextPath() %>/front/news!list.action">更多&gt;&gt;</a></div>
        </div>
        <div class="content">
          <ul class="news2">
          <%
          	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
          	List<News> newsList = (List<News>)((NewsManager)SpringUtil.getBean("newsManager")).queryNews(0, 6);
          	for(News news : newsList){
          		Integer id = news.getId();
          		String title = news.getTitle();
          		String publishTimeStr = sdf.format(news.getPublishTime());
          %>
            <li><a href="<%=request.getContextPath() %>/front/news!detail.action?id=<%=id%>"><%=title%></a><%=publishTimeStr%></li>
          <%
          	}
          %>
          </ul>
        </div>
      </div>
      <div class="GTbox">
        <div class="GTtitle"><h3>google广告</h3></div>
        <div class="content"> <img src="<%=request.getContextPath() %>/front/images/glad.gif" /> </div>
      </div>
    </div>
